using System.Text.Json.Serialization;

namespace Sage.CloudStorage.Qiniu.Models
{
    /// <summary>
    /// CDN刷新结果
    /// </summary>
    public class CdnRefreshResult
    {
        /// <summary>
        /// 状态码
        /// </summary>
        [JsonPropertyName("code")]
        public int Code { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonPropertyName("error")]
        public string? Error { get; set; }

        /// <summary>
        /// 请求ID(可用于反馈排查)
        /// </summary>
        [JsonPropertyName("requestId")]
        public string? RequestId { get; set; }

        /// <summary>
        /// 非法URL
        /// </summary>
        [JsonPropertyName("invalidUrls")]
        public List<string>? InvalidUrls { get; set; }

        /// <summary>
        /// 非法URL目录
        /// </summary>
        [JsonPropertyName("invalidDirs")]
        public List<string>? InvalidDirs { get; set; }

        /// <summary>
        /// 当日URL刷新限额
        /// </summary>
        [JsonPropertyName("urlQuotaDay")]
        public int UrlQuotaDay { get; set; }

        /// <summary>
        /// 当日剩余URL刷新额度
        /// </summary>
        [JsonPropertyName("urlSurplusDay")]
        public int UrlSurplusDay { get; set; }

        /// <summary>
        /// 当日URL目录刷新限额
        /// </summary>
        [JsonPropertyName("dirQuotaDay")]
        public int DirQuotaDay { get; set; }

        /// <summary>
        /// 当日剩余URL目录刷新额度
        /// </summary>
        [JsonPropertyName("dirSurplusDay")]
        public int DirSurplusDay { get; set; }
    }
}